'''
Created on 2012-1-4

@author: Administrator
'''
from TestResult import *

class TestCase:
    def __init__(self,name):
        self.name = name
        
    def setUp(self):
        pass
    
    def tearDown(self):
        pass
    
    def run(self,result):
        result.testStarted()
        self.setUp()
        try:            
            method = getattr(self,self.name)
            method()
        except:
            result.testFailed()
        self.tearDown()

    